converting er diagrams to tables